package work;

/**
 * @TODO
 * @Author xu
 * 2025/2/24
 */
public class Day4_7 {
    public static void main(String[] args) {
        String[] lines = {
                "床前明月光,",
                "疑是地上霜,",
                "举头望明月,",
                "低头思故乡。"
        };
        String[] transformedLines = new String[lines.length];
        for (int i = 0; i < lines.length; i++) {
            transformedLines[i] = reverseString(lines[i]);
        }
        for (String line : transformedLines) {
            System.out.println(line);
        }
        System.out.println("。, , ,");
    }
    public static String reverseString(String str) {
        StringBuilder reversed = new StringBuilder(str.length());
        for (int i = str.length() - 1; i >= 0; i--) {
            reversed.append(str.charAt(i));
        }
        return reversed.toString();
    }

}
